﻿using System;
using System.Collections.Generic;
using NVelocity;
using NVelocity.App;
using NVelocity.Context;
using NVelocity.Runtime;
using System.Web;
using weikebuluo.DAL;
using System.Data;

namespace weikebuluo.web.admin.other
{
    /// <summary>
    /// images1 的摘要说明
    /// </summary>
    public class images1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            BaseTemp bt = new BaseTemp();
            w_vlimg_dal vlimgdal = new w_vlimg_dal();
            
            IContext contxt = new VelocityContext();
            DataTable dtimg = vlimgdal.GetList("mid=" + context.Request.QueryString["id"] + " order by vl_id desc").Tables[0];
            if (dtimg.Rows.Count > 0)
            {
                contxt.Put("list", dtimg);
            }
            context.Response.Write(bt.WriterTemplate("/web/admin/other/images.html", contxt, 0));
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}